﻿using System;
using System.Data;
using System.Net;
using System.Windows.Forms;
using CuteSprite.Eme.Configuration;
using HmFramework;
using HmFramework.UI.Utils;
using ResManagerUtils = CuteSprite.Eme.UI.Utils.Resources.ResManager;

namespace CuteSprite.Eme.Server.Configuration
{
	public partial class FrmCompanyDiscount : HmBaseForm
	{
		public FrmCompanyDiscount()
		{
			InitializeComponent();
		}

		public override void FormOnLoad()
		{
			base.FormOnLoad();

			txtDiscount.Value = BsdSystemConfig.Current.CompanyDiscount;
		}

		private void btnCancel_Click(object sender, EventArgs e)
		{
			this.Close();
		}

		private void btnOK_Click(object sender, EventArgs e)
		{
			BsdSystemConfig.Current.CompanyDiscount = (SByte)txtDiscount.Value;
			BsdSystemConfig.Current.Save();
			this.Close();
		}
	}
}
